repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.2.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
      - id: check-toml
      - id: detect-private-key
      - id: check-added-large-files

  # Isort
  - repo: https://github.com/pycqa/isort
    rev: 5.12.0
    hooks:
      - id: isort

  # Black
  - repo: https://github.com/psf/black
    rev: 23.3.0
    hooks:
      - id: black

  # Flake 8
  - repo: https://github.com/PyCQA/flake8
    rev: 6.0.0
    hooks:
      - id: flake8

  # Typos
  - repo: https://github.com/crate-ci/typos
    rev: v1.16.23
    hooks:
      - id: typos

  # Mypy
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.2.0
    hooks:
      - id: mypy
        exclude: ^(docs/|example-plugin/|web_admin/|typings/)
        additional_dependencies: [types-redis, types-cachetools, types-python-dateutil]
